package com.mcxx.modules.miniSalvation.family.entity;

import lombok.Data;


@Data
public class FamilyEditEntity {

    private String orderId;

    private String orderType;

    private String businessType;

    private String familyId;

    private String familyMemberId;

    private String addressCode;

    private String applyDate;

    private String applyName;

    private String idCard;

    private Integer isOneProjectDiscussion;

    private String mainlyPovertyReasons;

    private String familyObjectType;

    private String phone;

    private String residentialAddress;

    private String temporaryType;

    private String state;
    private String stateName;

    private String areaCode;

    private String familyRelation;



    private String bankId;

    private String bankAccount;

    private String accountholdername;

    private String bankaccountIdcard;

    private String bankaccountaddress;

    private String openaccountbank;

    private String bankPhone;

    private String relation;

    private String disbursement;



    public FamilyEditEntity convertFromBank(BankEntity bankEntity) {
        if(bankEntity == null){
            return this;
        }
        setAccountholdername(bankEntity.getAgentOperator());
        setBankAccount(bankEntity.getAgentAccount());
        setOpenaccountbank(bankEntity.getAgentBankCode());
        setDisbursement(bankEntity.getPayType());
        setBankaccountIdcard(bankEntity.getAgentAccountIdcard());
        setBankaccountaddress(bankEntity.getAgentMemberAddress());
        setBankPhone(bankEntity.getAgentBankPhone());
        setRelation(bankEntity.getAgentRelation());
        return this;
    }
}
